package com.ruoyi.system.mapper;

import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.Appmanager;
import org.apache.ibatis.annotations.Param;

/**
 * 项目信息Mapper接口
 * 
 * @author yaozh
 * @date 2024-01-09
 */
public interface AppmanagerMapper 
{
    /**
     * 查询项目信息
     * 
     * @param appid 项目信息主键
     * @return 项目信息
     */
    public Appmanager selectAppmanagerByAppid(Long appid);

    /**
     * 查询项目信息列表
     * 
     * @param appmanager 项目信息
     * @return 项目信息集合
     */
    public List<Appmanager> selectAppmanagerList(Appmanager appmanager);

    public List<Appmanager> selectAllAppmanagerList();

    public List<Appmanager> selectAppManagerListByDeptIds(@Param("deptIds") Long[] deptIds,@Param("userId") Long userId);

    /**
     * 新增项目信息
     * 
     * @param appmanager 项目信息
     * @return 结果
     */
    public int insertAppmanager(Appmanager appmanager);

    /**
     * 修改项目信息
     * 
     * @param appmanager 项目信息
     * @return 结果
     */
    public int updateAppmanager(Appmanager appmanager);

    /**
     * 删除项目信息
     * 
     * @param appid 项目信息主键
     * @return 结果
     */
    public int deleteAppmanagerByAppid(Long appid);

    public int updateAppManagerStatusByAppId(@Param("appid") Long appid,@Param("state") String state,@Param("runStatus") String runStatus);

    /**
     * 批量删除项目信息
     * 
     * @param appids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAppmanagerByAppids(Long[] appids);

    public int updateAppManagerStatusByAppIds(@Param("appids") Long[] appids,@Param("state") String state,@Param("runStatus") String runStatus);

    public Appmanager checkAppExplainUnique(@Param("appExplain") String appExplain);

    public Appmanager checkAppNameUnique(@Param("appName") String appName);

    public void createDatabase(@Param("centralDatabase") String centralDatabase, @Param("dbName") String dbName);
    public int checkDataBaseUnique(@Param("dbName") String dbName);

    public int updateAppUserGroup(@Param("userId") Long userId, @Param("appId") Long appId, @Param("control") Integer control);
    public int insertAppUserGroup(@Param("userId") Long userId, @Param("appId") Long appId, @Param("control") Integer control);

    public int selectAppUserGroupByAppId(@Param("userId") Long userId, @Param("appId") Long appId);

    public int deleteAppUserGroupByAppId(@Param("userIds") Long[] userIds);
}
